<template>
    <div id="hotlist">
        <div class="newProductListWrapper">
            <section>
                <div v-for="(x,y) in proGroup">
                  <div v-for="v in x.prolist" >
                      <div class="newProductList" :id="v.pro_id" :type="v.id_type" @click="goNewDetail(v.pro_id,v.id_type)">
                          <header>
                              <dl>
                                  <dd><img :src="v.pro_image" style="width:100%;height:100%;"></dd>
                                  <dt style="text-align: left"><p style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;width: 93%;margin: 0 auto">{{v.pro_title}}</p></dt>
                              </dl>
                          </header>
                          <footer>
                              <div class="flo-l">
                                  <!--<span class="priceColor flo-l"></span>-->
                                  <span class="flo-l">
                                      <span class="priceColor" style="text-decoration: line-through;">￥{{v.pro_hprice}}</span>
                                  </span>
                                  <span class="flo-l" style="margin-left: .1rem">已砍{{v.pro_sells}}件</span></div>
                              <div class="flo-r">
                                  <a href="javascript:;">砍到{{v.pro_lprice}}元</a>
                              </div>
                          </footer>
                      </div>
                  </div>
                  <div class="titlelist" v-for="z in x.titlelist" :id="z.title_id">
                      <p style="margin-left: .25rem;padding: .3rem 0;overflow: hidden" @click="goRanking(z.title_id)" ><span style="float: left;font-size: .35rem;">{{z.title}}</span><span style="float: right;margin-right: .24rem;font-size: .3rem;color: #646464;display: flex;align-items: center;">查看更多<img src="https://khh-server.oss-cn-beijing.aliyuncs.com/resourse/IMG/static/more@2x.png" style="margin-left: .1rem;width: .14rem;height: .26rem;display: inline-block;"></span></p>
                      <v-guess :proGroup="z.data"></v-guess>
                  </div>
                </div>
            </section>
        </div>
    </div>

</template>

<script>
    import config from "../../config/config.js";
    import Guess from './guess.vue'
    export default {
        name: "hotlist",
        components:{
           "v-guess":Guess
        },
        data(){
            return{

            }
        },
        props:{
            proGroup:[]
        },
        methods:{
            goNewDetail(id,type){
                this.$router.push('/newDetail/'+id+''+'/'+type);
            },
            goRanking(id){

                this.$router.push('/lookMore/'+id)
            }
        },
        mounted(){


        },
        watch: {
            result(val) {
                this.proGroups = val;
            }
        },
    }
</script>

<style scoped>

</style>